The present invention relates to methods for processing computer program code, and more particularly to methods for processing computer program for execution on a plurality of processing elements.
Computers generally comprise a plurality of interacting components that work in combination to allow the computer to carry out tasks requested by a user. One component is the central processing unit (CPU), which is responsible for executing instructions and directing other components within the computer to perform their designated functions.
Computers are now widely used in a variety of different applications in business and leisure environments, and the demands placed upon computer processing power continue to increase. For example, in some business applications there is a need to rapidly process increasing quantities of complex information. In leisure applications, computers are used for entertainment purposes and as user expectations of the sophistication of computer graphics increase, processing performance is required to increase to generate computer graphics which satisfies user expectations.
Generally, computers with a single CPU can only execute one instruction in any clock cycle. This inevitably restricts processor performance by limiting the number of instructions that can be executed in a given time period. With this in mind, CPUs with more than one processor core, generally referred to as multi-core processors, have been employed in computers. As each processing core in a multi-core processor can execute instructions concurrently, more than one instruction can be executed at any one time thereby improving processor performance.
Multi-core processors therefore provide the ability to process the instructions of an application in parallel using more than one processor core. An application may be split into a number of separately processable tasks (often called threads) each of which can be executed on a separate processor core.
Taking advantage of parallel processing for single applications requires applications to be purposely designed with threads to make use of the multiple processor cores. Designing applications to use multiple processor cores is generally considered to be a complex and difficult task. In general terms, the complexity and difficulty of designing applications to use multiple processor cores increases with the number of processor cores used. Designing programs with multiple threads introduces the need to manage data which may be used by multiple threads, and to ensure that particular threads are not executed before other threads on which they depend.
For existing programs, the problem is made worse by the need to re-write the application to make use of the multiple processor cores, ensuring that the integrity of the program is maintained.